package com.pda.gongpin.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.pda.gongpin.R;
import com.pda.gongpin.bean.ManifestBean;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;

import java.util.List;

public class ManifestListAdapter extends BaseAdapter<ManifestBean.AbnormalDataDetailVosBean> {
    public ManifestListAdapter(int layoutResId, @Nullable List<ManifestBean.AbnormalDataDetailVosBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ManifestBean.AbnormalDataDetailVosBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_spec,"规格："+item.getSpec());
        helper.setText(R.id.tv_articleId,"物品编码： "+item.getArticleId());
        helper.setText(R.id.tv_articleName,"物品名称："+item.getArticleName());
        helper.setText(R.id.tv_surfaceTreatment,"表色："+item.getSurfaceTreatment());
        helper.setText(R.id.tv_brand,"品牌："+item.getBrand());
        helper.setText(R.id.tv_packageSpecFull,"包格："+item.getPackageSpecFull());
        helper.setText(R.id.tv_numberStr,"库存数量："+item.getNumberStr());
        helper.setText(R.id.tv_storageBinId,"库位："+item.getStorageBinId());
        helper.setText(R.id.tv_container,"容器号："+item.getContainer());
        helper.setText(R.id.tv_materialCode,"我的料号："+item.getMaterialCode());
        String str="";
        if (item.getStatus().equals("10")){
            str="待盘点";
        }else  if (item.getStatus().equals("20")){
            str="待回库";
        }else {
            str="已完成";
        }
        helper.setText(R.id.tv_status,str);
    }
}
